package com.zt.english.network

import com.zt.mvvm.network.AbstractRetrofits

/**
 * 翻译retrofit
 */
class TranslateRetrofits private constructor() :AbstractRetrofits() {
    override fun baseUrl(): String  = "https://openapi.youdao.com/"

    override fun token(): String = ""
    override fun version(): String {
        return ""
    }

    override fun headers(): HashMap<String, String> {
        val map = HashMap<String,String>()
        return map
    }

    override fun clientId(): String = "youdao_id"

    override fun clientSec(): String = "youdao_sec"

    /**
     * 线程安全的单列懒汉式
     */
    companion object{
        private val instance : TranslateRetrofits = TranslateRetrofits()
        @Synchronized
        fun create(): TranslateRetrofits {
            return instance
        }
    }
}